//
//  ViewControllerForVideoCollectPlay.m
//  世界
//
//  Created by admin on 16/3/2.
//  Copyright © 2016年 admin. All rights reserved.
//

#import "ViewControllerForVideoCollectPlay.h"

#import "ModelForForVideoCollect.h"
#import "DataBaseForVideo.h"

@interface ViewControllerForVideoCollectPlay ()

@property (nonatomic, retain) NSMutableArray *arrForModels;

@end

@implementation ViewControllerForVideoCollectPlay

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [[DataBaseForVideo shareDataBaseHandle]open];
    
    [[DataBaseForVideo shareDataBaseHandle] createTable];
    
    self.arrForModels = [[DataBaseForVideo shareDataBaseHandle] select];
    
    //网络视频请求
    UIWebView *movieView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    ModelForForVideoCollect *model = [self.arrForModels objectAtIndex:self.number];
    
    NSURLRequest *requset = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:model.mp4_url]];
    
    [movieView loadRequest:requset];
    
    [self.view addSubview:movieView];
    
    [movieView release];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    
}


@end
